# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-defcon
pkgver=0.10.3
pkgrel=2
pkgdesc="Flexible objects for represnting UFO data"
options="!check" # Requires unpackaged FontPens
url="https://github.com/robotools/defcon"
arch="noarch"
license="MIT"
depends="python3 py3-fonttools py3-fs py3-unicodedata2"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-setuptools_scm
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/robotools/defcon/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/defcon-$pkgver"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/defcon-*.whl
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/defcon/test
}

sha512sums="
ac74d14be194bde4cf10e7355959038b229af50e4731dd46cc28ab7f44fdcc84114da4c3300d5411efada9e3971d3a923835d49b1f20049a36935ac4df8e0e90  py3-defcon-0.10.3.tar.gz
"
